/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦]
 * 
 * https://zhiqim.org/project/zhiqim_framework/zhiqim_kernel.htm
 *
 * Zhiqim Kernel is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.kernel.logging;

import org.zhiqim.kernel.constants.CodeConstants;

/**
 * 日志常量定义
 *
 * @version v1.0.0 @author zouzhigang 2016-1-8 新建与整理
 */
public interface LogConstants extends CodeConstants
{
    /******************************************************************/
    //日志配置
    /******************************************************************/
    
    String MUST_NAME                = "must.name";
    String MUST_CLASS               = "must.class";
    String CONSOLE_OUT              = "console.out";
    String CONSOLE_PATTERN          = "console.pattern";
    String FILE_OUT                 = "file.out";
    String FILE_PATH                = "file.path";
    String FILE_PATTERN             = "file.pattern";
    String FILE_ENCODING            = "file.encoding";
    String FILE_MAX_NUM             = "file.maxNum";
    String FILE_MAX_SIZE            = "file.maxSize";
    String FILE_APPENDER            = "file.appender";
    
    /** 默认格式 */
    String PATTERN_DEFAULT          = "%d [%t] %l - %m%n";
    
    /******************************************************************/
    //日志等级相关常量
    /******************************************************************/
    
    //日志等级
    int UNKNOWN                     = 0;
    int DEBUG                       = 1;
    int INFO                        = 2;
    int ERROR                       = 3;
    int WARN                        = 4;
    int FATAL                       = 5;
    
    //日志等级字符串
    String UNKNOWN_STR              = "UNDNOWN";
    String DEBUG_STR                = "DEBUG";
    String INFO_STR                 = "INFO";
    String ERROR_STR                = "ERROR";
    String WARN_STR                 = "WARN";
    String FATAL_STR                = "FATAL";
    
    /******************************************************************/
    //log4j日志器常量
    /******************************************************************/
    
    String LOG4J_LOGGER_CLASS       = "org.apache.log4j.Logger";
    String LOG4J_LOGGER_METHOD      = "getLogger";
    String LOG4J_LOGGER_DEBUG       = "debug";
    String LOG4J_LOGGER_INFO        = "info";
    String LOG4J_LOGGER_ERROR       = "error";
    String LOG4J_LOGGER_WARN        = "warn";
    String LOG4J_LOGGER_FATAL       = "fatal";
    String LOG4J_LOGGER_IS_DEBUG    = "isDebugEnabled";
    String LOG4J_LOGGER_IS_INFO     = "isInfoEnabled";
    String LOG4J_LOGGER_IS_ERROR    = "isErrorEnabled";
    String LOG4J_LOGGER_IS_WARN     = "isWarnEnabled";
    String LOG4J_LOGGER_IS_FATAL    = "isFatalEnabled";
}
